from typing import List
from pydantic import BaseModel


class DeviceModel(BaseModel):
    sn: str
    devicename: str
    status: int
    text: str
    n_product_type: str
    n_tag: str
    deviceTypeName: str
    groupName: str


class DataModel(BaseModel):
    list: List[DeviceModel]
    total: int


class ResultModel(BaseModel):
    data: DataModel


class DeviceListResponse(BaseModel):
    code: int
    message: str
    result: ResultModel
